<template>
  <div class="add">
    <el-form ref="form" :model="form"  label-width="100px">


      $--FORMITEM--$

      <!--
      <el-form-item label="$attribute-comments$" >
        <el-input v-model="form.$attribute$" placeholder = "请输入$attribute-comments$"/>
      </el-form-item>
      
      -->


      <!-- 表单按钮 -->
      <el-form-item>
        <el-button type="primary" @click="submitForm()">发布</el-button>
        <el-button @click="">重置</el-button>
      </el-form-item>
    </el-form>
  </div>
</template>

<script>
import { addObj } from '@/api/$TABLENAME$'

export default {
  name: 'Add$TABLENAME$',
  data() {
    return {
      form: {
$--FORMATTRIBUTE--$
      },

     
    }
  },
  methods: {


    submitForm() {
      addObj(this.form).then(res => {
        this.$message({
          message: '添加成功',
          type: 'success'
        })
        this.$router.push('/$TABLENAME$/list')
      })
    },
    resetForm(formName) {
     
    }


  
  }
}
</script>

<style lang="scss" scoped>
.add {
  padding: 20px;
}

</style>
